<?php
namespace App\admin\validate;
use Respect\Validation\Validator;

class Base{
  protected $rules = [];

  public function __construct($rules = [])
  {
    $this->rules = $rules;
  }

  public function check($data){
    return Validator::input($data, $this->getRules());
  }

  protected function getRules(){
    return $this->rules;
  }
}